package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 3:08:52 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * TbCategoriaContr generated by hbm2java
 */
@Entity
@Table(name = "TB_CATEGORIA_CONTR", schema = "CATALOGOS", uniqueConstraints = @UniqueConstraint(columnNames = {
		"C_CATEGORIA", "C_OBLIGACION", "C_GESTION", "C_TRAMITE" }))
public class TbCategoriaContr implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String ccodigo;
	private TbTramite tbTramite;
	private TbObligacion tbObligacion;
	private String ccategoria;
	private String dcategoria;
	private Integer bnrc;
	private String cusuario;
	private Date fhingreso;

	public TbCategoriaContr() {
	}

	public TbCategoriaContr(String ccodigo, TbTramite tbTramite,
			TbObligacion tbObligacion, String ccategoria, String dcategoria,
			Integer bnrc, String cusuario, Date fhingreso) {
		this.ccodigo = ccodigo;
		this.tbTramite = tbTramite;
		this.tbObligacion = tbObligacion;
		this.ccategoria = ccategoria;
		this.dcategoria = dcategoria;
		this.bnrc = bnrc;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
	}

	@Id
	@Column(name = "C_CODIGO", unique = true, nullable = false, length = 3)
	public String getCcodigo() {
		return this.ccodigo;
	}

	public void setCcodigo(String ccodigo) {
		this.ccodigo = ccodigo;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumns( {
			@JoinColumn(name = "C_GESTION", referencedColumnName = "C_GESTION", nullable = false),
			@JoinColumn(name = "C_TRAMITE", referencedColumnName = "C_TRAMITE", nullable = false) })
	public TbTramite getTbTramite() {
		return this.tbTramite;
	}

	public void setTbTramite(TbTramite tbTramite) {
		this.tbTramite = tbTramite;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "C_OBLIGACION", nullable = false)
	public TbObligacion getTbObligacion() {
		return this.tbObligacion;
	}

	public void setTbObligacion(TbObligacion tbObligacion) {
		this.tbObligacion = tbObligacion;
	}

	@Column(name = "C_CATEGORIA", nullable = false, length = 4)
	public String getCcategoria() {
		return this.ccategoria;
	}

	public void setCcategoria(String ccategoria) {
		this.ccategoria = ccategoria;
	}

	@Column(name = "D_CATEGORIA", nullable = false, length = 50)
	public String getDcategoria() {
		return this.dcategoria;
	}

	public void setDcategoria(String dcategoria) {
		this.dcategoria = dcategoria;
	}

	@Column(name = "B_NRC", nullable = false, precision = 1, scale = 0)
	public Integer getBnrc() {
		return this.bnrc;
	}

	public void setBnrc(Integer bnrc) {
		this.bnrc = bnrc;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

}
